The present invention relates to an apparatus and method for retrieving data from a database in a remote computer via a serial transmission line. In particular, the invention provides a means of transmitting data in a compressed format according to a scheme which does not incidentally create codes typically used as flow control codes in serial data stream transmission equipment, like modems.
A plethora of databases are currently maintained in large, mainframe computers, and are made available to users of personal computers or other types of remotely located computers by transmission over telephone lines or other serial transmission means. To access the data stored in such a database, for example, a user may employ a personal computer with a modem and software for controlling the modem. The modem control software in conjunction with the modem allows the user to dial a database access telephone number, establish communication with a modem attached to the mainframe unit, and send data retrieval requests to the mainframe unit. In response, the mainframe unit sends the requested data, typically in packets of a given length in bytes.
The transmitted data commonly comprises textual data, though other data corresponding to numeric or graphical data may also be transmitted. Textual data may be transmitted in the widely-used ASCII format. According to this format, all letters of the alphabet, numbers and punctuation marks are assigned one of 128 different codes. According to a prevalent extended ASCII character set, 256 codes account for the original 128 characters, plus some graphical and scientific symbols, as well as some European letters not used in the English language. ASCII codes less than decimal-value 16 have traditionally been used as control codes for formatting the text, or as flow control codes, or both. As serial transmission equipment has become more complex, some ASCII codes greater than decimal-value 15 but less than decimal-value 32 have come to be used to control data flow.
Among the various concerns in transmitting a serial data stream is an interest in reducing the on-line time charges. To this end, any of a number of methods in the prior art may be used to compress the data to be transmitted, thereby decreasing the time of transmission, and reducing the period of waiting for the user. An example of such a compression scheme is Lempel-Ziv-Welch (LZW) compression.
A disadvantageous result of almost all compression schemes is that compressed bytes may be generated which have an ASCII code with a decimal-value between zero and 32. These codes may correspond to flow control commands, and when transmitted between serial transmission equipment, may cause unexpected results impacting on communications.
For example, though the LZW algorithm typically reserves the lowest 256 codes for the extended ASCII set, without compression, the algorithm requires data words of more than 8 bits, such as 12 bits for example. When these words are treated in 8-bit bytes, there exists the possibility of generating ASCII codes from 0 to 31, which may create unintentional effects on modem communications.
What is needed is a system for compressing data for serial transmission which cannot incidentally generate ASCII codes corresponding to flow control codes, e.g., codes of decimal-value less than 16 or 32, and for properly decompressing the compressed data at a receiving location.